home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / bbs / pad311.zip / FILE.MH < prev    next >
Text File  |  1996-07-17  |  2KB  |  67 lines

  1. #ifndef __FILE_MH
  2. #define __FILE_MH
  3.  
  4. #ifndef __STRING_MH
  5. #include "string.mh"
  6. #endif
  7.  
  8. #ifndef __SETTINGS_MH
  9. #include "settings.mh"
  10. #endif
  11.  
  12. #define commentChar ';'
  13.  
  14. //void otherLog (int: fd, string: message) {
  15. //  long: t;
  16. //  struct _stamp: ts;
  17. //
  18. //  log (message);
  19. //  t := time ();
  20. //  long_to_stamp (t,ts);
  21. //  writeln (fd, substr (message, 1, 1) + stamp_string (ts) + "PAD " + substr (message, 2, strlen (message) - 1));
  22. //  }
  23.  
  24. void show_file (string: filename) {
  25.   char: nonstop;
  26.   if (filename = "") return;
  27.   nonstop := 0;
  28.   display_file (message_file_directory + "\\" + filename, nonstop);
  29.   }
  30.  
  31. void show (string: filename, string: message) {
  32.   if (filename = "") {
  33.     if (message <> "")
  34.       print (message);
  35.     }
  36.   else show_file (filename);
  37.   }
  38.  
  39. //void getToken (int: fd, Ref string: token, Ref string: params) {
  40. //  string: line;
  41. //  int: idx;
  42. //
  43. //  do {
  44. //    readln (fd, line);
  45. //    stripRightOf (line, commentChar);
  46. //    line := strtrim (line, " \t");
  47. //    } while (strlen (line) = 0);
  48. //  idx := stridx (line,1,' ');
  49. //  if (idx) {
  50. //    token       := substr (line,1,idx-1);
  51. //    params      := strtrim (substr (line,idx,strlen (line) - idx + 1), " \t");
  52. //    }
  53. //  else {
  54. //    token := line;
  55. //    params := "";
  56. //    };
  57. //  token := strlower (token);
  58. //  stripChar (token,'_');
  59. //  if (strlen (params) > 0) {
  60. //    if ((params [1] = '"') and (params [strlen (params)] = '"')) {
  61. //      params := substr (params, 2, strlen (params) - 2);
  62. //      };
  63. //    };
  64. //  }
  65.  
  66. #endif
  67.